Class SequencedBase<T>

Base class (abstract) for sequenced collection implementations.

Implements

IEnumerable<T>, System.Collections.IEnumerable, System.IFormattable, ICollectionValue<T>, IDirectedCollectionValue<T>, IDirectedEnumerable<T>, IShowable

Bases

object, EnumerableBase<T>, CollectionValueBase<T>, CollectionBase<T>, DirectedCollectionBase<T>

Base of

ArrayBase<T>, ArrayList<T>, CircularQueue<T>, HashedArrayList<T>, HashedLinkedList<T>, LinkedList<T>, SortedArray<T>, TreeBag<T>, TreeSet<T>

Field overview

isReadOnly, Inherited from CollectionBase<T> ,
itemequalityComparer, Inherited from CollectionBase<T> ,
size, Inherited from CollectionBase<T> ,
stamp, Inherited from CollectionBase<T>

Event overview

CollectionChanged, Inherited from CollectionValueBase<T> ,
CollectionCleared, Inherited from CollectionValueBase<T> ,
ItemInserted, Inherited from CollectionValueBase<T> ,
ItemRemovedAt, Inherited from CollectionValueBase<T> ,
ItemsAdded, Inherited from CollectionValueBase<T> ,
ItemsRemoved, Inherited from CollectionValueBase<T>

Property overview

ActiveEvents, Inherited from CollectionValueBase<T> ,
Count, Inherited from CollectionBase<T> ,
CountSpeed, Inherited from CollectionBase<T> ,
Direction ,
EqualityComparer, Inherited from CollectionBase<T> ,
IsEmpty, Inherited from CollectionBase<T> ,
IsReadOnly, Inherited from CollectionBase<T> ,
ListenableEvents, Inherited from CollectionValueBase<T> ,
SyncRoot, Inherited from CollectionBase<T>

Constructor overview

SequencedBase<T>(System.Collections.Generic.IEqualityComparer<T> itemequalityComparer)

Method overview

All(Fun<T,bool> predicate), Inherited from CollectionValueBase<T> ,
Apply(Act<T> action), Inherited from CollectionValueBase<T> ,
Backwards(), Inherited from DirectedCollectionBase<T> ,
checkRange(int start, int count), Inherited from CollectionBase<T> ,
Choose(), Inherited from CollectionValueBase<T> ,
ComputeHashCode(ISequenced<T> items, System.Collections.Generic.IEqualityComparer<T> itemequalityComparer) ,
CopyTo(T[] array, int index), Inherited from CollectionValueBase<T> ,
Equals(object obj), Inherited from object ,
Exists(Fun<T,bool> predicate), Inherited from CollectionValueBase<T> ,
Filter(Fun<T,bool> predicate), Inherited from CollectionValueBase<T> ,
Finalize(), Inherited from object ,
Find(Fun<T,bool> predicate, out T item), Inherited from CollectionValueBase<T> ,
FindIndex(Fun<T,bool> predicate) ,
FindLast(Fun<T,bool> predicate, out T item), Inherited from DirectedCollectionBase<T> ,
FindLastIndex(Fun<T,bool> predicate) ,
GetEnumerator() ,
GetHashCode(), Inherited from object ,
GetSequencedHashCode() ,
GetType(), Inherited from object ,
GetUnsequencedHashCode(), Inherited from CollectionBase<T> ,
MemberwiseClone(), Inherited from object ,
modifycheck(int thestamp), Inherited from CollectionBase<T> ,
raiseCollectionChanged(), Inherited from CollectionValueBase<T> ,
raiseCollectionCleared(bool full, int count), Inherited from CollectionValueBase<T> ,
raiseCollectionCleared(bool full, int count, System.Nullable<int> offset), Inherited from CollectionValueBase<T> ,
raiseForAdd(T item), Inherited from CollectionValueBase<T> ,
raiseForInsert(int i, T item), Inherited from CollectionValueBase<T> ,
raiseForRemove(T item), Inherited from CollectionValueBase<T> ,
raiseForRemove(T item, int count), Inherited from CollectionValueBase<T> ,
raiseForRemoveAll(ICollectionValue<T> wasRemoved), Inherited from CollectionValueBase<T> ,
raiseForRemoveAt(int index, T item), Inherited from CollectionValueBase<T> ,
raiseForSetThis(int index, T value, T item), Inherited from CollectionValueBase<T> ,
raiseForUpdate(T newitem, T olditem), Inherited from CollectionValueBase<T> ,
raiseForUpdate(T newitem, T olditem, int count), Inherited from CollectionValueBase<T> ,
raiseItemInserted(T item, int index), Inherited from CollectionValueBase<T> ,
raiseItemRemovedAt(T item, int index), Inherited from CollectionValueBase<T> ,
raiseItemsAdded(T item, int count), Inherited from CollectionValueBase<T> ,
raiseItemsRemoved(T item, int count), Inherited from CollectionValueBase<T> ,
SequencedEquals(ISequenced<T> otherCollection) ,
Show(System.Text.StringBuilder stringbuilder, ref int rest, System.IFormatProvider formatProvider), Inherited from CollectionValueBase<T> ,
StaticEquals(ISequenced<T> collection1, ISequenced<T> collection2, System.Collections.Generic.IEqualityComparer<T> itemequalityComparer) ,
ToArray(), Inherited from CollectionValueBase<T> ,
ToString(string format, System.IFormatProvider formatProvider), Inherited from CollectionValueBase<T> ,
ToString(), Inherited from CollectionValueBase<T> ,
UnsequencedEquals(ICollection<T> otherCollection), Inherited from CollectionBase<T> ,
updatecheck(), Inherited from CollectionBase<T>

Property details

EnumerationDirection DirectionAccess: Read-Only

Value:The enumeration direction relative to the original collection.

Forwards if same, else Backwards

Constructor details

SequencedBase<T>(System.Collections.Generic.IEqualityComparer<T> itemequalityComparer)
Parameters:
itemequalityComparer:

Method details

S int ComputeHashCode(ISequenced<T> items, System.Collections.Generic.IEqualityComparer<T> itemequalityComparer) Compute the unsequenced hash code of a collection
Returns:The hash code
Parameters:
items:The collection to compute hash code for
itemequalityComparer:The item equalityComparer
F int FindIndex(Fun<T,bool> predicate) Check if there exists an item that satisfies a specific predicate in this collection and return the index of the first one.
Returns:the index, if found, a negative value else
Parameters:
predicate:A delegate (Fun<A1,R> with R == bool) defining the predicate
F int FindLastIndex(Fun<T,bool> predicate) Check if there exists an item that satisfies a specific predicate in this collection and return the index of the last one.
Returns:the index, if found, a negative value else
Parameters:
predicate:A delegate (Fun<A1,R> with R == bool) defining the predicate
A System.Collections.Generic.IEnumerator<T> GetEnumerator() Create an enumerator for this collection.
Returns:The enumerator
int GetSequencedHashCode() Get the sequenced collection hash code of this collection: from the cached value if present and up to date, else (re)compute.
Returns:The hash code
bool SequencedEquals(ISequenced<T> otherCollection) Check if the contents of that is equal to the contents of this in the sequenced sense. Using the item equalityComparer of this collection.
Returns:True if equal
Parameters:
otherCollection:The collection to compare to.
S bool StaticEquals(ISequenced<T> collection1, ISequenced<T> collection2, System.Collections.Generic.IEqualityComparer<T> itemequalityComparer) Examine if tit and tat are equal as sequenced collections using the specified item equalityComparer (assumed compatible with the two collections).
Returns:True if equal
Parameters:
collection1:The first collection
collection2:The second collection
itemequalityComparer:The item equalityComparer to use for comparison